import mmlib.mmboom_component_resolver as mmboom_component_resolver
import mmlib.mmboom_component_transfer as mmboom_component_transfer

def get_names(username, ttype=None, tname=None) :
    names = []
    name_list = mmboom_component_resolver.get_name_list(username, tname)
    for name in name_list :
        if ttype != None :
                names += mmboom_component_transfer.name_transfer(name, ttype)
        else :
            names.append(''.join(name))
    return names

def get_births(userbirth, tbirth=None, connector=None) :
    births = []
    birth_list = mmboom_component_resolver.get_birth_list(userbirth, tbirth)
    for birth in birth_list :
        if connector != None :
            births.append(mmboom_component_transfer.date_transfer(birth, connector))
        else :
            births.append(''.join(birth))
    return births

def get_cards(usercard) :
    return mmboom_component_resolver.get_card_list(usercard)

def get_phones(userphone) :
    return mmboom_component_resolver.get_phone_list(userphone)
